<style type="text/css">
.photo_text1, .photo_text1 a:link, .photo_text1 a:visited {
    -moz-text-blink: none;
    -moz-text-decoration-color: -moz-use-text-color;
    -moz-text-decoration-line: none;
    -moz-text-decoration-style: solid;
    color: #666666;
    font-family: Verdana,Arial,Helvetica,sans-serif;
    font-size: 8px;
    font-weight: normal;
    letter-spacing: 1px;
    line-height: 11px;
    text-transform: uppercase;
}
.smalltext_nav {
    -moz-text-blink: none;
    -moz-text-decoration-color: -moz-use-text-color;
    -moz-text-decoration-line: none;
    -moz-text-decoration-style: solid;
    color: #666666;
    font-family: Verdana,Arial,Helvetica,sans-serif;
    font-size: 8px;
    letter-spacing: 1px;
    text-transform: uppercase;
}
#flagFit {
    max-height: 60px;
    max-width: 90px;
	vertical-align: middle;
}
#flagFit {
    width: 90px;
}
/* Flags ----------*/
.flag_description {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 11px;
	color: #999999;
	padding-top: 6px;
	padding-right: 6px;
	padding-bottom: 6px;
	padding-left: 6px;
}
.flag_border {
	border: 1px solid #CCCCCC;
	background-color: #FFFFFF;
	padding: 3px;
	margin: 3px;
}
#flag_border {
	border: 1px solid ##CCCCCC;
	background-color: #FFFFFF;
	padding: 3px;
	margin: 3px;
}
#largeflag {
	/*background-image: url(graphics/#regionCode#_photogallery_bkgrnd.jpg);*/
	background-position: top;
	background-repeat: repeat-x;
	border: 0px;
	margin: 0px;
	padding: 0px;
	
}
#largeflag a:link, #largeflag a:visited, #largeflag a:active {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 8px;
	color: #FFFFFF;
	text-transform: uppercase;
	letter-spacing: 1px;
	font-weight: bold;
	vertical-align: middle;
	text-align: right;
	border: 0px;
	}

#largeflag #print a:hover  {
	text-decoration: none;
	border: 0px;
}


#flagborder {
	border: 1px solid #CCCCCC;
}
#flag_caption{
	/*background-image: url(../graphics/flag_caption_bkgrnd.gif);*/
	background-repeat: no-repeat;
	background-position: 0px 14px;
	margin: 0;
	vertical-align: top;
	padding-top: 10px;
}

.layout_country_profile_header table {
    border-collapse: inherit;
}
.layout_country_profile_header table td{
   text-aligin: center;
}
#mapFit {
    max-width: 650px;
	text-align: center;
}
#afr_smmapborder {
	border: 1px solid #d9e4cd;
	background-color: #FFFFFF;
	padding: 2px;
	margin: 2px;
}
.photo_bkgrnd_static {
    background-image: url("application/modules/Country/externals/images/photo_bkgrnd_static.gif");
    background-position: left bottom;
    background-repeat: no-repeat;
    margin-top: 2px;
}
</style>
<table width="638" cellspacing="0" cellpadding="0" border="0">
    <tbody><tr>
      <td width="316" valign="bottom" height="182" background="application/modules/Country/externals/images/afr_flag_loc_bkgrnd.jpg" border="0" style="background-repeat:no-repeat; background-position:top left"><table width="100%" height="180" cellspacing="0" cellpadding="0" border="0" align="center">
          <tbody>
          <tr>
            
              
              <td width="50%" valign="middle" align="center"><table width="100%" cellspacing="3" cellpadding="0" border="0" align="center" valign="top">
                  <tbody><tr>
                    <td valign="middle" height="95" background="application/modules/Country/externals/images/afr_smflag_bkgrnd.jpg" align="center" border="0" style="background-repeat:no-repeat; background-position: center bottom; text-align: center;">
                          <a target="_blank" onclick="return false" href="#"> <img border="0" style="cursor:pointer; margin-top: 8px;" title="Flag" class="flag_border" alt="Flag" id="flagFit" src="<?php echo $this->subject->getPhotoUrl($this->subject->flag_photo_id)?>"> </a>
                        </td>
                  </tr>
                  <tr>
                    <td valign="top" height="10" align="center" class="smalltext_nav" style="text-align: center;">
                        (CONTAINS DESCRIPTION)
                      </td>
                  </tr>
                </tbody></table></td>
            
            <td width="50%" valign="middle" align="center">
                <a  onclick="return false" href="#"> <img border="0" alt="Location" title="Location" style="border: 2px double #d9e4cd; background: #FFFFFF; text-align: center;margin-right: 6px;max-width: 133px; max-height: 127px;" src="<?php echo $this->subject->getPhotoUrl($this->subject->small_map_photo_id)?>"> </a>
                </td>
          </tr>
          <?php /*<tr>
            <td valign="middle" height="15" align="center" style="color: #3f7805;; letter-spacing:1px; line-height: 10px;" class="smalltext_nav" colspan="2">
                Click flag or map to enlarge <span class="smalltext_nav1"><img border="0" style="padding-bottom: 1px;" title="Opens in New Window" alt="Opens in New Window" src="application/modules/Country/externals/images/afr_newwindow.gif"></span>
              </td>
          </tr>
           *
           */?>
        </tbody></table></td>
      <td width="8" height="275" rowspan="3">&nbsp;</td>
      <td width="314" valign="middle" height="275" background="application/modules/Country/externals/images/afr_map_bkgrnd.jpg" rowspan="3"><table width="95%" height="302" cellspacing="0" cellpadding="0" border="0" align="center">
          <tbody><tr>
            <td valign="middle" height="287" align="center">
		  	
	   				<div id="mapFit">
						
                    			<a target="_blank" onclick="return false" href="#"> <img border="0" title=" Map" class="mapFit" id="afr_smmapborder" alt="Map" src="<?php echo $this->subject->getPhotoUrl($this->subject->big_map_photo_id)?>" style="height: 256px; width: 239px;"> </a>
                  			
					</div>
                	
		    </td>
          </tr>
          <?php /*<tr>
            <td valign="bottom" height="15" align="center" style="color: #3f7805;; letter-spacing:1px; line-height: 10px; " class="smalltext_nav" colspan="2">
                Click map to enlarge <span class="smalltext_nav1"> <img border="0" style="padding-bottom: 1px;" title="Opens in New Window" alt="Opens in New Window" src="application/modules/Country/externals/images/afr_newwindow.gif"> </span>
              </td>
          </tr>
           *
           */ ?>
        </tbody></table></td>
    </tr>
    <tr>
      <td width="314" valign="top" align="left" class="photo_bkgrnd_static"> 
            <table width="290" height="123" cellspacing="0" cellpadding="0" border="0">
              <tbody><tr>
               <?php 
                    $mediaT = Engine_Api::_()->getDbtable('introducemedias',"country");
                    $mediaCount = $mediaT->countMedia($this->subject->getIdentity());
                ?>
                                
                <td valign="middle" align="center"><table width="290" cellspacing="0" cellpadding="0" border="0" align="left">
                    <tbody><tr>
                      <td width="150" valign="bottom" align="center" rowspan="4">
                         <?php 
                            if ($mediaCount == 0) :
                         ?>
                          <img width="123" height="89" border="0" title="No Photos Avaliable for <?php  echo $this->subject->getTitle();?>" style="padding:5px;" alt="No Photos available for <?php  echo $this->subject->getTitle();?>" src="application/modules/Country/externals/images/photo_off.gif">
                          <?php else:?>
                          
                          <img width="123" height="89" border="0" title="Photos of <?php  echo $this->subject->getTitle();?>" style="padding:5px;" alt="Photos of <?php  echo $this->subject->getTitle();?>" src="application/modules/Country/externals/images/photo_on.gif">
                          
                          <?php endif;?>
                        </td>
                    </tr>
                    
                      <tr>
                        <td valign="top" align="left" colspan="2"><table cellspacing="0" cellpadding="0">
                            <tbody><tr>
                              <td height="27" class="photo_text1">&nbsp;</td>
                            </tr>
                            <tr>
                                
                              <td class="photo_text1"><?php 
                                    if ($mediaCount == 0) echo $this->translate('no photos available of %s', $this->subject->getTitle());
                                    else echo "<a href='".$this->baseUrl()."/country/index/view-media/cid/".$this->subject->getIdentity()."'>" .$this->translate('view %d photos of %s', $mediaCount,$this->subject->getTitle());
                                    ?></a></td>
                            </tr>
                          </tbody></table></td>
                      </tr>
                    
                  </tbody></table></td>
              </tr>
            </tbody></table>
          </td>
    </tr>
  </tbody></table>
  <?php echo $this->profile_field; ?>